<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class ContentController extends AppController {

    var $layout = 'subpage';
    var $uses = array(
        'Content', 'Game', 'Basket', 'Share', 'Logo', 'Banner'
    );
    var $helpers = array('Cache');
    var $cacheAction = array(
        'detail' => 120,
    );

    function detail() {
        $id = isset($this->params['id']) ? $this->params['id'] : 0;

        $content = $this->Content->read(array('id', 'title', 'content', 'slide', 'logo'), $id);
        $this->set('title_for_layout', $content['Content']['title'] . ' -  trái cây việt | trái cây | trái cây viêt nam | trái cây ngoại nhập | giỏ trái cây | trái cây tươi');
        $this->set('content', $content);
        $this->set('game_image_thumb_url_path', Configure::read('game_image_thumb_url_path'));
        $this->set('top_games', $this->Game->getTopGame());
        $this->set('basket_image_thumb_url_path', Configure::read('basket_image_thumb_url_path'));
        $this->set('lastestShare', $this->Share->getLastestShare());
        $this->set('best_buy_product', $this->Basket->getBestBuy());
        $this->set('logo', $this->Logo->getLogo());
        $this->set('logo_thumb_url_path', Configure::read('logo_thumb_url_path'));
        $this->set('banners_customers', $this->Banner->getBanners());
        $this->set('banner_image_thumb_url_path', Configure::read('banner_image_thumb_url_path'));
    }

}

?>
